-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Snowplow tracking for behavior flags #10721
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10721 +/- ##
==========================================
+ Coverage 88.90% 88.96% +0.05%
==========================================
Files 180 181 +1
Lines 22785 22968 +183
==========================================
+ Hits 20257 20433 +176
- Misses 2528 2535 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
core/dbt/events/logging.py
Outdated
@@ -68,6 +70,7 @@ def setup_event_logger(flags, callbacks: List[Callable[[EventMsg], None]] = []) | |||
make_log_dir_if_missing(flags.LOG_PATH) | |||
event_manager = get_event_manager() | |||
event_manager.callbacks = callbacks.copy() | |||
add_callback_to_manager(track_behavior_deprecation_warn) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want snowplow tracking for behavior flags regardless of the log setting. It should only be turned off when the user turns off tracking. However, this is handled outside of the event manager. The downside is that tests need to be updated for this, though it appears to only be one test.
I think these tests are failing due to updates in |
* add behavior deprecation snowplow callback * update tests for new callback * update test input with the new required field
resolves #10552
Problem
We need to track deprecated states of behavior flags in Snowplow so that we get telemetry for both Cloud and Core users.
Solution
Handle the event that is already firing for logging with a callback that tracks the event in Snowplow.
Checklist